
const { Calendar, Alert } = antd;

class App extends React.Component {
  state = {
    value: moment('2017-01-25'),
    selectedValue: moment('2017-01-25'),
  }
  onSelect = (value) => {
    this.setState({
      value,
      selectedValue: value,
    });
  }
  onPanelChange = (value) => {
    this.setState({ value });
  }
  render() {
    const { value, selectedValue } = this.state;
    return (
      <div style={{ width: 500, border: '1px solid #d9d9d9', borderRadius: 4 }}>
        <Alert message={`当前选择日期: ${selectedValue && selectedValue.format('YYYY-MM-DD')}`} />
        <Calendar value={value} fullscreen={false} onSelect={this.onSelect} onPanelChange={this.onPanelChange} />
      </div>
    );
  }
}

ReactDOM.render(<App />, document.getElementById('app1'));